﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Medianamik.UI.Blog.Logic;
using Medianamik.Globalization;

namespace Medianamik.UI.Blog.Controls
{
    public class GroupCheckBoxList : Medianamik.UI.Controls.GroupCheckBoxList
    {
        public override object DataSource
        {
            get
            {
                return BlogGroups.GetGroups().Select(g => new { Value = g, 
                                                                Text = String.Format("{0} ({1})", Translator.Translate("Medianamik_Blog", "Group_" + g), g) });
            }
            set
            {
                base.DataSource = value;
            }
        }
    }
}
